package com.walker.controller.catalogue;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.walker.anno.ResponseResult;
import com.walker.service.catalogue.CatalogueProjectService;

import net.sf.json.JSONObject;

/**
 * 资产-目录-字段
 */
@RestController
@RequestMapping(value = "/catalogueProject")
@ResponseResult
public class CatalogueProjectController {

	@Resource
	private CatalogueProjectService service;
	
	/**
	 * 项目列表
	 * @param request
	 * @return
	 */
	@SuppressWarnings("unchecked")
	@PostMapping("queryProjectList")
	public Map<String, Object> queryProjectList(@RequestBody String request) {
		Map<String, Object> params = JSONObject.fromObject(request);
		return service.queryProjectList(params);
	}
	
	/**
	 * 空间类型
	 * @return
	 */
	@PostMapping("querySpaceTypeInfo")
	public List<Map<String, Object>> querySpaceTypeInfo() {
		return service.querySpaceTypeInfo();
	}
	
	/**
	 * 业务板块
	 * @return
	 */
	@PostMapping("queryBusinessFieldInfo")
	public List<Map<String, Object>> queryBusinessFieldInfo() {
		return service.queryBusinessFieldInfo();
	}
	
	/**
	 * 数据表列表
	 * @param request
	 * @return
	 */
	@SuppressWarnings("unchecked")
	@PostMapping("queryTableList")
	public Map<String, Object> queryTableList(@RequestBody String request) {
		Map<String, Object> params = JSONObject.fromObject(request);
		return service.queryTableList(params);
	}
}